package project.innovation.mooddiagnosis.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import project.innovation.mooddiagnosis.entity.file.FileInfo;

import java.util.List;

public interface FileMapper {
    @Insert("INSERT INTO file values (#{fileId}, #{fileName}, #{fileSize}, #{md5})")
    public Integer insertFile(FileInfo fileInfo);
    @Select("SELECT * FROM file WHERE f_md5 = #{md5}")
    FileInfo selectFileByMd5(String md5);
    @Select("SELECT * FROM file")
    List<FileInfo> selectFileList();
}
